package network;

import core.Main;
import core.ScheduledWeek;
import core.TimeActivity;


public class MessageParser {
	private Object obj;
	private Thread thread;    
	private ScheduledWeek scheduleWeek;
	private HttpGetter httpGetter;
	public MessageParser(){
		scheduleWeek = Main.getList();	
		httpGetter = new HttpGetter();
		obj = new Object();
	}

	public void sendWeek(){
		sendMondays();
		sendTuesdays();
		sendWednesdays();
		sendThursdays();
		sendFridays();
		sendSaturdays();
		sendSundays();
	}


	public void sendMondays(){
		for (TimeActivity t : scheduleWeek.getMonday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Mon", t.getHour(), t.getMinutes());
			
			
		
	}

	public void sendTuesdays(){
		for (TimeActivity t : scheduleWeek.getTuesday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Tue", t.getHour(), t.getMinutes());
	}

	public void sendWednesdays(){
		for (TimeActivity t : scheduleWeek.getWednesday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Wed", t.getHour(), t.getMinutes());
	}

	public void sendThursdays(){
		for (TimeActivity t : scheduleWeek.getThursday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Thu", t.getHour(), t.getMinutes());
	}

	public void sendFridays(){
		for (TimeActivity t : scheduleWeek.getFriday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Fri", t.getHour(), t.getMinutes());
	}
	public void sendSaturdays(){
		for (TimeActivity t : scheduleWeek.getSaturday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Sat", t.getHour(), t.getMinutes());
	}

	public void sendSundays(){
		for (TimeActivity t : scheduleWeek.getSunday())
			//Ska skicka tid + dag till HttpGetter
			httpGetter.sendGetMsg("Sun", t.getHour(), t.getMinutes());
	}
	
		   
	
}
